﻿using SuperFrame.Charts.Points;
using System;
using System.Windows.Media;

namespace SuperFrame.Charts
{
    /// <summary>
    /// TimePoint
    /// </summary>
    public class PointTime : ChartPoint
    {
        public PointTime()
        {
        }
        public PointTime(string ID, DateTime dateTime, double value)
        {
            this.Time = dateTime;
            this.Value = value;
            this.ID = ID;
        }
        public PointTime(string ID, DateTime dateTime, double value, Brush color)
        {
            this.Time = dateTime;
            this.Value = value;
            this.Color = color;
            this.ID = ID;
        }
        public PointTime(string ID, DateTime dateTime, double value, string describe)
        {
            this.Time = dateTime;
            this.Value = value;
            this.Describe = describe;
            this.ID = ID;
        }
        public PointTime(string ID, DateTime dateTime, double value, Brush color, string describe)
        {
            this.Time = dateTime;
            this.Value = value;
            this.Color = color;
            this.Describe = describe;
            this.ID = ID;
        }



        public PointTime(DateTime dateTime, double value)
        {
            this.Time = dateTime;
            this.Value = value;
        }
        public PointTime(DateTime dateTime, double value, Brush color)
        {
            this.Time = dateTime;
            this.Value = value;
            this.Color = color;
        }
        public PointTime(DateTime dateTime, double value, string describe)
        {
            this.Time = dateTime;
            this.Value = value;
            this.Describe = describe;
        }
        public PointTime(DateTime dateTime, double value, Brush color, string describe)
        {
            this.Time = dateTime;
            this.Value = value;
            this.Color = color;
            this.Describe = describe;
        }

        private DateTime m_time;
        public DateTime Time
        {
            get
            {
                return m_time;
            }
            set
            {
                m_time = value;
                this.XValue = m_time.ToOADate();
            }
        }

        private double m_value;
        public double Value
        {
            get
            {
                return m_value;
            }
            set
            {
                m_value = value;
                this.YValue = value;
            }
        }

    }
}
